<?php
namespace App\Controllers;
class Dcmember extends \CodeIgniter\Controller
{
public function index()
{
// connect to the model
$dcmember = new \App\Models\Dcmember();
// retrieve all the records
$records = $dcmember->findAll();
// JSON encode and return the result
return json_encode($records);
}
}